//
//  YXButton.m
//  彩票
//
//  Created by mac on 15-3-30.
//  Copyright (c) 2015年 mac. All rights reserved.
//

#import "YXButton.h"


@implementation YXButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self) {
        
    }
    return self;
}

/*- (CGRect)titleRectForContentRect:(CGRect)contentRect
{
    CGFloat X = 0;
    CGFloat Y = 0;
    CGFloat W = contentRect.size.width - 15;
    CGFloat H = contentRect.size.height;
    return CGRectMake(X, Y, W, H);
    
}

- (CGRect)imageRectForContentRect:(CGRect)contentRect
{
//    CGFloat X = contentRect.size.width - 30;
//    CGFloat Y = 0;
//    CGFloat W = 30;
//    CGFloat H = contentRect.size.height;
//    return CGRectMake(X, Y, W, H);
    CGFloat imageW = 15;
    CGFloat imageH = contentRect.size.height;
    CGFloat imageY = 0;
    CGFloat imageX = contentRect.size.width  - 15;
    return CGRectMake(imageX, imageY, imageW, imageH);


}*/
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.titleLabel.X = self.imageView.X;
    self.imageView.X = CGRectGetMaxX(self.titleLabel.frame);
    
    
}

@end
